//存放路由
const fs = require("fs")

module.exports = function (routeEvent){
    routeEvent.on('/',(req,res)=>{
        res.setHeader("content-type","text/html;charset=utf-8");
        
        let data = fs.readFileSync('./views/index.html')
        res.write(data);
        res.end();
    })
    

    routeEvent.on("/users",(req,res)=>{
        res.setHeader("content-type","text/html;charset=utf-8");
        // 用户路由
       let data =  fs.readFileSync("./views/users.html");
       res.write(data);
       res.end();
    })

}